﻿#region header

//  ***************************************************************************
// *                                LICENSE
//  ***************************************************************************
//  * "Haplous" .NET Simple 2D Game Framework
//  * 
//  * Copyright © Jonathan Evans 2014-2014
//  * 
//  * This program is free software; you can redistribute it and/or
//  * modify it under the terms of the GNU General Public License
//  * as published by the Free Software Foundation; either version 2
//  * of the License, or (at your option) any later version.
//  * 
//  * This program is distributed in the hope that it will be useful,
//  * but WITHOUT ANY WARRANTY; without even the implied warranty of
//  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  * GNU General Public License for more details.
//  * 
//  * You should have received a copy of the GNU General Public License
//  * along with this program; if not, write to the Free Software
//  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
//  * 
//  ***************************************************************************
//  * 
//  * Contact: opencollar@googlemail.com
//  * 
//  * Website: http://haplous.codeplex.com/
//  *
//  * NuGet:   http://www.nuget.org/packages/haplous/
//  *
//  * File:    Haplous/Haplous/IElement.cs
//  *
//  ***************************************************************************

#endregion

using System;
using System.Collections.Generic;
using System.ComponentModel;

using JetBrains.Annotations;

namespace Haplous
{
    /// <summary>
    ///     The interface shared by all elements that derive from the <see cref="ElementBase" /> object.
    /// </summary>
    public interface IElement : IDisposable, INotifyPropertyChanged
    {
        /// <summary>
        ///     Gets a unique name that can be used to identify this object.
        /// </summary>
        /// <value>The unique name of this item.</value>
        /// <remarks>The name must never be <see langword="null" />, empty or whitespace.</remarks>
        [NotNull]
        string Name { get; }

        /// <summary>
        ///     Gets the game to which the entity belongs.
        /// </summary>
        /// <value>The game to which teh entity belongs.</value>
        [NotNull]
        Game Game { get; }

        /// <summary>
        ///     Gets a value indicating whether the <see cref="IDisposable.Dispose()" /> method has been called on this instance.
        /// </summary>
        /// <value><see langword="true" /> if this instance is disposed; otherwise, <see langword="false" />.</value>
        bool IsDisposed { get; }

        /// <summary>
        ///     Copies the property values for the element in one mode to another mode.
        /// </summary>
        /// <param name="source">The source mode of the property values.</param>
        /// <param name="destination">The destination mode of the property values.</param>
        /// <param name="excludedProperties">A list of the names of the properties to exclude from the copy.</param>
        void CopyModeProperties([NotNull] Mode source, [NotNull] Mode destination, [CanBeNull] IEnumerable<string> excludedProperties);
    }
}